package org.auf.core;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.auf.to.User;

public abstract class Controller {

	protected HttpServletRequest request;
	protected HttpServletResponse response;
	protected Privileges privileges;
	protected IView view;
	protected User user;
	
	public Privileges getPrivileges() {
		return privileges;
	}
	
	public void setPrivileges(Privileges value) {
		this.privileges = value;
	}
	
	public void setUser(User user) {
		this.user = user;
	}

	public void assignThread(HttpServletRequest request, HttpServletResponse response, HttpServlet servlet) {
		this.request = request;
		this.response = response;
		this.view = new View(request,response, servlet);
	}
	
	public IView getView() { return view; }
	
	public abstract void show();

}
